﻿window.onload = function () {

    // Creating a reference to the mapDiv
    var mapDiv = document.getElementById('map');

    // Creating a latLng for the center of the map
    var latlng = new google.maps.LatLng(31.416944, 121.490936);

    // Creating an object literal containing the properties 
    // we want to pass to the map  
    var options = {
        center: latlng,
        zoom: 2,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };

    // Creating the map
    var map = new google.maps.Map(mapDiv, options);

    var marker1 = new google.maps.Marker({
        position: new google.maps.LatLng(31.41, 121.48),
        map: map,
        title: 'Shanghai',
        icon: '/Images/China.png'
    });

    var marker2 = new google.maps.Marker({
        position: new google.maps.LatLng(51.521562, -0.120163),
        map: map,
        title: 'London',
        icon: '/Images/uk.png'
    });

    var marker3 = new google.maps.Marker({
        position: new google.maps.LatLng(35.705262, 139.690475),
        map: map,
        title: 'Tokyo',
        icon: '/Images/jp.png'
    });

    var marker4 = new google.maps.Marker({
        position: new google.maps.LatLng(52.541285, 13.401947),
        map: map,
        title: 'Berlin',
        icon: '/Images/gem.png'
    });
}




